package com.birboot.core;

import com.birboot.http.HttpServletRequest;

import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;
import java.util.HashMap;
import java.util.Map;
import java.util.SplittableRandom;

public class ClientHandler  implements Runnable {
    private Socket socket;

    public ClientHandler(Socket socket) {
        this.socket = socket;
    }

    public void run(){
        try {
            //1解析请求
            //v4：将解析请求的细节移动到request构造器中进行
            HttpServletRequest request = new HttpServletRequest(socket);
            String str = request.getUri();
            System.out.println(str);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
